<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="70%" border="1">
  <?php
include "connect.php";

$from=$_POST['from'];
$to=$_POST['to'];
$result=mysql_query("SELECT * from teacher_attendence WHere  date between '$from' AND '$to'") or die(''.mysql_error());
while($row=mysql_fetch_array($result)){
?>
  
  
  <tr>
    <td>Teacher Id</td>
    <td>Date</td>
    <td>Attendence</td>
  </tr>
  <tr>
    <td><?php echo $row['teacher_id']; ?></td>
    <td><?php echo $row['date']; ?></td>
    <td><?php echo $row['present']; ?></td>
  </tr>
  <?php } ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>